//
//  OosActivityActor.m
//  Oos4ios
//
//  Created by Pablo Gonzalez on 3/31/11.
//  Copyright 2011 11870.com. All rights reserved.
//

#import "OosActivityElement.h"
#import "../../Constants/OosNamespaces.h"
#import "../../GData/Common/Elements/GDataLink.h"

@implementation OosActivityElement

+ (NSString *) extensionElementURI			
{ 
	return ACTIVITY_NAMESPACE; 
}
+ (NSString *) extensionElementPrefix		
{ 
	return ACTIVITY_PREFIX; 
}
+ (NSString *) extensionElementLocalName	
{ 
	return nil; 
}

@end

@implementation OosActivityValueElement

+ (NSString *) extensionElementURI			
{ 
	return ACTIVITY_NAMESPACE; 
}
+ (NSString *) extensionElementPrefix		
{ 
	return ACTIVITY_PREFIX; 
}
+ (NSString *) extensionElementLocalName	
{ 
	return nil; 
}

@end

@implementation OosActivityType

+ (NSString *) extensionElementLocalName	
{ 
	return @"object-type"; 
}

@end

@implementation OosActivityAtomObject

+ (NSString *) extensionElementLocalName	
{ 
	return @"object"; 
}

- (void)addExtensionDeclarations {
	
	[super addExtensionDeclarations];
	
	Class entryClass = [self class];
	
	[self addExtensionDeclarationForParentClass:entryClass
								   childClasses:
	 // Atom extensions
//	 [GDataAtomID class],
//	 [GDataAtomTitle class],
//	 [GDataLink class],
//	 [GDataAtomAuthor class],
	 
	 // Oos Extensions
	 [OosAvatar class],
	 [OosSlug class],
	 [OosFnv class],
	 [OosActivityType class],
	 
	 nil];
}

 - (OosActivityType *) activityType
{
	return [super objectForExtensionClass: [OosActivityType class]];
}

- (GDataAtomID *) identifier
{
	return [super objectForExtensionClass: [GDataAtomID class]];
}

- (GDataAtomTitle *) title
{
	return [super objectForExtensionClass: [GDataAtomTitle class]];
}

- (OosAvatar *) avatar
{
	return [super objectForExtensionClass: [OosAvatar class]];
}

- (OosSlug *) slug
{
	return [super objectForExtensionClass: [OosSlug class]];
}

- (OosFnv *) fnv
{
	return [super objectForExtensionClass:[OosFnv class]];
}

- (NSArray *)links {
	return [self objectsForExtensionClass:[GDataLink class]];
}

@end


@implementation OosActivityAtomActor

+ (NSString *) extensionElementLocalName	
{ 
	return @"actor"; 
}

@end


